package com.kara.woodAgent.agent.graph.communicate;

import com.kara.woodAgent.agent.graph.GraphContext;
import lombok.Data;

import java.io.Serializable;

/**
 * @author tzy
 * @version 1.0
 * @project wood_agent
 * @description
 * @date 2025/6/5 10:33:41
 */
public


@Data
class StepImage<T extends GraphContext> implements Serializable {


	public static final String STATUS_CHECKING = "checking";

	public static final String STATUS_SUB_GRAPH_CHECKING = "sub_graph_checking";

	public static final String STATUS_INIT = "init";


	private String status;

	private String node;

	private String graphClassName;

	private T context;

	private ChannelPayload channelPayload;

	private ChannelMessage channelMessage;


	public static <T extends GraphContext> StepImage<T> from(T context) {
		StepImage<T> contextStepImage = new StepImage<>();
		contextStepImage.setContext(context);
		return contextStepImage;
	}

	public boolean subGraphCheck() {
		return STATUS_SUB_GRAPH_CHECKING.equals(status);
	}

}

